package com.lal.springboot.config;

import com.lal.sdk.LalServerClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class LalServerConfig {

    @Value("${lalserver.api-url:http://localhost:8080}")
    private String lalServerBaseUrl;
    @Value("${lalserver.stream-url:http://localhost:8081}")
    private String streamUrl;
    @Value("${lalserver.proxy-base-url:http://localhost:8080}")
    private String proxyBaseUrl;
    @Value("${lalserver.enable-security-proxy:true}")
    private boolean enableSecurityProxy;

    @Bean
    public LalServerClient lalServerClient() {
        return new LalServerClient(lalServerBaseUrl, proxyBaseUrl, enableSecurityProxy,streamUrl);
    }
}